home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 1.3 KB | 38 lines | [TEXT/CWIE] |
- This is a simple demo of three ways to implement a password dialog, where
- characters typed are not drawn; instead, anonymous characters such as
- bullets are drawn, keeping the password secure.
-
- The methods have various pros and cons:
-
- Two Items:
- + No need to maintain internal buffer
- + No nasty extra fonts
- - Requires another edit text item for each password item
- - Requires relatively complex dialog filter.
-
- Different font:
- + Very simple to use
- + Works properly with System 7's hacks for cut/copy/paste in dialogs
- - Requires a special font in your application (which has been known to
- cause problems, such as ID conflicts)
- - Requires that you make all your static text items UserItems with their
- own drawing procedure, plus you cannot have any non-password edittext
- items.
-
- Internal Buffer:
- + Works well, is fairly clean
- - Requires you to do some of the work of TextEdit (inserting, deleting
- characters).
-
- I haven't implemented a fourth method, which I've seen used, which replaces
- the QuickDraw bottleneck for text in the dialog, and then changes all text
- drawn within the appropriate edit text item to little squares.
-
- All the interesting code is in Password.c- Sample.c is just the application
- shell, and it's just a copy of the CSample code with most of the Traffic
- Light stuff hacked out.
-
- Enjoy.
- Tim Dierks
- UK Mac DTS
-